package com.cafuc.jdk8;

import com.cafuc.entity.User;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

public class OptionalOperation {
    public static void main(String[] args){
        List<User> users = new ArrayList<>();
        if(users != null && !users.isEmpty()){
            //TODO
        }
        Optional.ofNullable(users).orElse(Collections.emptyList());
    }

}
